/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package pe.com.minam.daorepository;

import java.util.List;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;
import pe.com.minam.beans.Lugar;

/**
 *
 * @author Willian
 */
@Repository
public interface LugarDao extends JpaRepository<Lugar, String> {
    
    @Query("SELECT l FROM Lugar l WHERE l.departamento.id = :depa AND l.estado = :estado)")
    List<Lugar> getLugarPorDepa(@Param("depa") Integer depa, @Param("estado") String estado );
}
